<%@ page language="java" import="java.util.*,com.zmht.specedu.vo.Module"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
/**
 * @author 
 * @since 2009/05/07
 */
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";


%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<fmt:setBundle basename="PathResource" scope="session" />
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>聋校备课与语言学习及矫治系统</title>
<link href="<%=request.getContextPath()%>/<fmt:message key='StylePath' />style.css" rel="stylesheet" type="text/css" />

</head>
<SCRIPT language=JScript>
var oldflagi ="start";
var oldflagh;
function turnit(body,div,index) {
	var ico = document.getElementById(div+"_ico");
	var text = document.getElementById(div+"_text");
	if (body.style.display == "none") {
	    if (oldflagi != "start"){
	    	oldflagi.src = "<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />menu_notactive.gif";
		    oldflagh.style.display = "none"; 
	    }
		body.style.display = "block"
		ico.src = "<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />menu_active.gif";
		text.style.filter = "glow(color=#ff9100,strength=3)";
		
		oldflagi = ico;
		oldflagh = body;
		for(var i = 0;i< <c:out value="${moduleCount}" /> ;i++) {  
		   if(index == i) {   
			   ico.src= "<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />menu_active.gif";
			   text.style.filter = "glow(color=#ff9100,strength=3)";
		   }else{
		      document.getElementById("module"+i+"_ico").src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />menu_notactive.gif";
		      document.getElementById("module"+i+"_text").style.filter = "glow(color=#006ec8,strength=3)";
		   }
		}
	} else {
		body.style.display = "none"; 
		ico.src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />menu_notactive.gif";
		text.style.filter = "glow(color=#006ec8,strength=3)";
	}
}
function LinkMain(url)
{
   window.open(url,'mainFrame');
   
}
function OpenMain(theURL,winName,features)
{
  window.open(theURL,winName,features);
}
function changemain()
{  
   parent.document.all.mains.cols="9,*";
   document.getElementById("chgid").style.display="inline";
}
function changemains()
{  
   
   parent.document.all.mains.cols="180,*";
   document.getElementById("chgid").style.display="none";
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function resizeheight()
{  
document.getElementById("leftid").style.height=screen.Height-348;
}
</SCRIPT>

<body class="style2" onload="resizeheight()">
<table width="186" border="0" cellspacing="0" cellpadding="0">
  <tr>

    <td width="287" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="85" align="left" valign="top"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jw_img/left_01.gif" width="186" height="85" /></td>
      </tr>
      <tr>
        <td id="leftid"  align="center" valign="top" class="bgimg_left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="287" align="center" valign="top" background="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jw_img/left_03.gif"><table width="100%" border="0" cellspacing="1" cellpadding="0">
			<%
										List ms = (List) request.getAttribute("modules");
										for (int i = 0; i < ms.size(); i++) {
											Module m = (Module) ms.get(i);
									%>
			
              <tr>
                <td align="center"><table width="80%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                    	<td height="30" align="left" valign="bottom">
							<table align="left" border="0px" cellpadding="0" cellspacing="0">
								<tr style="CURSOR: hand;" onmouseup="turnit(Href<%=i%>, 'module<%=i%>','<%=i%>')">
									<td><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />menu_notactive.gif" name="module<%=i%>_ico" width="19px" height="19px" id="module<%=i%>_ico" style="border: 0px; padding: 10px;"/></td>
									<td id="module<%=i%>_text" style="font-size:13px;padding:2px; font-family:宋体;font-weight:bold; color:white;filter:glow(color=#006ec8,strength=3);">
										<%=m.getName() %>
									</td>
								</tr>
							</table>
						</td>
                    </tr>
                    <tbody style="DISPLAY: none" id="Href<%=i%>">
                      <tr>
                        <td align="left" valign="top"><table width="100%" border="0" cellspacing="10" cellpadding="0">
						
						<%
																	Collection items = (Collection) m.getModules();
																		Module mj = null;
																		Iterator it = items.iterator();
																		while (it.hasNext()) {
																			mj = (Module) it.next();
																%>
						
                            <tr>
                              <td width="30" align="right" valign="middle"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jw_img/gif-0455.gif" width="7" height="7" /></td>
                              <td align="left" valign="middle">
							  <a href="#" onclick="LinkMain('<%=mj.getUrl() == null ? "" : mj.getUrl()%>')"><%=mj.getName()%></a>
							  </td>
                            </tr>
                           
						   <%
							}
							%>
						   
                        </table></td>
                      </tr>
                    </tbody>
                </table></td>
              </tr>
              <%
				}
				%>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="26" align="center" valign="top" class="bgimg_left02">&nbsp;</td>
      </tr>
    </table></td>
    <!--<td width="9" align="left" valign="middle"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />jw_img/left_0.gif" width="9" style="CURSOR: hand" height="67" onclick="changemain()" /></td>-->
  </tr>
</table>
</body>
</html>
